package gof.com.yew.Iterator;

public class IteratorDemo {
	
	public static void main(String[] args) {
		MyContainer c = new MyContainer();
		c.addObject("aaa");
		c.addObject("bbb");
		c.addObject("ccc");
		c.addObject("tttttttt");
		System.out.println(c.getLists().toString());
		Iterator it = c.getIterator();
		while(it.hasNext()) {
			System.out.println(it.next());
		}
	}

}
